from settings import LOGGER, BASE_DIR
import sys
import importlib

sys.path.append(BASE_DIR)
_module_path = LOGGER["BACKEND"]
_module_path, _cls = _module_path.rsplit(".", 1)
log_module = importlib.import_module(_module_path)
_logger_cls = getattr(log_module, _cls)

logger = _logger_cls(LOGGER["LEVEL"], LOGGER["FORMAT"], **LOGGER['OPTIONS'])

info = logger.info
debug = logger.debug
warn = logger.warn
error = logger.error
